[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+---------+################################################################
#+-| M_GETLN |--------------------------------------------------------+#######
#| +---------+ Returns the current line of ASCII text from memo_field |#######
#+--------------------------------------------------------------------+#######
##############################################################################
##############################################################################
#+--| Summary |--------------+################################################
#| #INCLUDE memo.hdr |################################################
#+---------------------------+################################################
##############################################################################
##############################################################################
#+--| Syntax |-------------------------------------------+####################
#| PROCEDURE m_getln PROTOTYPE |####################
#| PARAMETERS MEMO memo_field, CHAR output_line |####################
#+-------------------------------------------------------+####################
##############################################################################
##############################################################################
#########+---| Description |---------------------------------------+##########
#########| The m_getln procedure returns the current line of ASCII |##########
#########| text from memo_field. If the memo_field is at EOF, |##########
#########| then a NULL string is returned. |##########
#########| ------------------------------------------------------- |##########
#########| Characters are read from memo_field until a carriage |##########
#########| return and line-feed are encountered, which are each |##########
#########| stripped from output_line. output_line is NULL |##########
#########| terminated. |##########
#########| ------------------------------------------------------- |##########
#########| output_line buffer must be large enough to accommodate |##########
#########| the entire line of text because m_getln does not check |##########
#########| the size of the destination buffer. |##########
#########+---------------------------------------------------------+##########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Copy contents of the memo file to a printer. |#########
#########| |#########
#########| SET PRINT ON |#########
#########| DO WHILE .NOT. m_eof( data->m1989 ) |#########
#########| m_getln( data->m1989, line ) |#########
#########| ? line |#########
#########| ENDDO |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Print a copy of a memo. |#########
#########| |#########
#########| PROCEDURE print_memo |#########
#########| VARDEF |#########
#########| CHAR(80) memo_line |#########
#########| ENDDEF |#########
#########| ACCEPT "Print memo [Y/N] " TO ans |#########
#########| IF ans $ "yY" |#########
#########| SET PRINT ON |#########
#########| DO WHILE .NOT. m_eof( d->mfld ) |#########
#########| c = m_getln( d->mfld, memo_line ) |#########
#########| ? memo_line |#########
#########| ENDDO |#########
#########| SET PRINT OFF |#########
#########| ENDIF |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
m_close
m_edit
m_eof()
m_exist()
m_open
...
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson